import request from '@/utils/request';

/**
 * @description 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/user/query', params);
};

/**
 * 添加
 */
export const addInfo = data => {
    return request.post('/sys/user/insert', data);
};

/**
 * 更新
 */
export const updateInfo = data => {
    return request.post('/sys/user/update', data);
};

/**
 * 删除
 */
export const deleteInfo = data =>{
    return request.post(`/sys/user/delete`,data)
}

/**
 * 用户重置密码1-发送验证码
 */
 export const remoteEmailCode = inputmail =>{
    return request.post(`/sys/user/password/verifycode?inputEmail=${inputmail}`)
}

/**
 * 用户重置密码1-修改新密码
 */
export const resetUserPassword = (verifycode,newpassword)=>{
    return request.post(`/sys/user/password/reset?verifycode=${verifycode}&newpassword=${newpassword}`)
}

export default{
    remoteList
}